package com.ruoyi.yuwen.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 账单明细对象 t_bill
 * 
 * @author ruoyi
 * @date 2023-04-20
 */
@Data
public class Bill extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 商品下单数量 */
    @Excel(name = "商品下单数量")
    private Long num;

    /** 余额变动（单位：分） */
    @Excel(name = "余额变动", readConverterExp = "单=位：分")
    private Long amout;

    /** 账单类型（0：入账，1：出账） */
    @Excel(name = "账单类型", readConverterExp = "0=：入账，1：出账")
    private Integer type;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户名 */
    @Excel(name = "用户名")
    private String userName;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 创建时间 */
    @Excel(name = "创建时间")
    private String addTime;

    /** 是否已结算（0：未结算，1：已结算） */
    @Excel(name = "是否已结算", readConverterExp = "0=：未结算，1：已结算")
    private Integer state;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("num", getNum())
            .append("amout", getAmout())
            .append("type", getType())
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("phone", getPhone())
            .append("addTime", getAddTime())
            .append("state", getState())
            .toString();
    }
}
